
{ include("common.asl") }
!init.
+!init : path(A)
	<-  .println(A);
		makeArtifact("gui", "simulator.GuiBPM");
		!abrirGui;
		/*leerXml(A);
		.my_name(Me);
		?current_wsp(Id,_,_);
		 +default_wsp(Id);
		 .println("testing remote..");
		 joinRemoteWorkspace("integrationWorkspace","192.168.1.102",WspID2);
		 ?current_wsp(_,WName,_);
		 .println("hello there ",WName);
		 .println("te paso el path ",A);
		 !use_remote;*/
		 quitWorkspace.

+!abrirGui                   <- mostrarResultados.

+!use_remote : true
  <-lookupArtifact("kITKnowledgeRequest",Id);
	focus(Id);
	?contenido(X);
     pasarKit(X).

+mostrar(V) 
  <- ?default_wsp(Id);
     println("contenido: ",V)[wsp_id(Id)].

-!use_remote 
  <- ?default_wsp(WId);
     println("artifact already created ")[wsp_id(WId)];
     lookupArtifact("KITKnowledgeRequest",Id);
     focus(Id).

{ include("org_code.asl") }
		
//+!createStorageAgent <- .create_agent(bob, "src/asl/knowledgeStorageAgent.asl",[beliefBaseClass(jason.bb.TextPersistentBB)]).
		/*
+!createStorageAgent <-
		//.create_agent(bob,"x.asl", [agentClass(myp.MyAgent)])
		.create_agent(knowledgeStorageAgent,"src/asl/knowledgeStorageAgent.asl", [agentArchClass(myp.MyArch)]);
		?kitSpecification(Specification);
		.send(knowledgeStorageAgent, tell, Specification).
				
-!lookupRemote [makeArtifactFailure("artifact_already_present",_)]
			<- ?default_wsp(WId);
			
+!lookupRemote 
			<- lookupArtifact("KITStorageRequest",Id);
			   focus(Id).
!makeKITSpecificationArtifact
			<-;		   
+createGUI
		<- true.	*/